package model;

public enum Stage {
	init{
	    public String toString() {
	        return "Initiator";
	    }
	    public String processToString(){
	    	return "ordering";
	    }
	}, paint{
	    public String toString() {
	        return "Painter";
	    }
	    public String processToString(){
	    	return "painting";
	    }
	}, lather{
	    public String toString() {
	        return "Latherer";
	    }
	    public String processToString(){
	    	return "lathering";
	    }
	}, rinse{
	    public String toString() {
	        return "Rinser";
	    }
	    public String processToString(){
	    	return "rinsing";
	    }
	}, wrap{
	    public String toString() {
	        return "Wrapper";
	    }
	    public String processToString(){
	    	return "wrapping";
	    }
	}, dispatch{
	    public String toString() {
	        return "Dispatcher";
	    }
	    public String processToString(){
	    	return "dispatching";
	    }
	};
	
	public Stage nextStage(){
		switch(this){
		case init:
			return paint;
		case paint:
				return lather;
		case lather:
				return rinse;
		case rinse:
				return wrap;
		default:
				return dispatch;
		}
		
	}

	public String processToString() {
		switch(this){
		case init:
			return "ordering";
		case paint:
			return "painting";
		case lather:
			return "lathering";
		case rinse:
			return "wrapping";
		default:
			return "dispatching";
		}
	}
}
